<template>
  <el-checkbox v-model="val" :disabled="disabled" size="mini" @change="onChange" />
</template>

<script>
export default {
  name: 'BoolCheckbox',
  props: {
    value: {
      type: [Boolean, String],
      default: false
    },
    disabled: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      val: !!this.value
    }
  },
  methods: {
    onChange() {
      this.$emit('input', this.val)
    }
  }
}
</script>
